const { defineConfig } = require("@vue/cli-service");
const { name } = require("./package.json");
const path = require("path");

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 5000,
    headers: {
      "Access-Control-Allow-Origin": "*",
    },
  },
  configureWebpack: {
    resolve: {
      alias: {
        "@": path.resolve("src"),
      },
    },
    devtool: "source-map",
    output: {
      library: `${name}-[name]`,
      libraryTarget: "umd",
      // jsonpFunction: "webpackJsonp_vueApp2"
    },
  },
});
